package com.edais.dao;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;

import com.edais.domain.Bank;
import com.edais.domain.UnbindingCardApply;
import com.edais.domain.UserQuickWithdraw;
import com.edais.domain.UserRecePayCard;
import com.edais.domain.UserZSHTCheckCard;
import com.edais.domain.WithdrawErrorSendMobile;
import com.edais.domain.ZSHTCheckBankCountInfo;
import com.edais.persistence.UnbindingCardApplyMapper;
import com.edais.persistence.UserCardMapper;

@Repository

public class UserCardDao {

	@Autowired
	private UserCardMapper userCardMapper;
	
	@Autowired
	private UnbindingCardApplyMapper unbindingCardApplyMapper;
	
	public List<UserRecePayCard> queryUserCardInfoByUserId(Map<String,Object> paramMap){
		return userCardMapper.queryUserCardInfoByUserId(paramMap);
	}
	
	public Integer queryBankIdByBankCode(Map<String,Object> paramMap){
		return userCardMapper.queryBankIdByBankCode(paramMap);
	}
	
	public Bank queryBankInfoByBankCode(Map<String,Object> paramMap){
		return userCardMapper.queryBankInfoByBankCode(paramMap);
	}
	
	public void saveUserBankCardInfo(UserRecePayCard userRecePayCard){
		userCardMapper.saveUserBankCardInfo(userRecePayCard);
	}
	
	public UserRecePayCard queryBankCardByCardNo(Map<String,Object> paramMap){
		return userCardMapper.queryBankCardByCardNo(paramMap);
	}
	
	public Integer updateUserBankCardInfo(UserRecePayCard userRecePayCard){
	   return 	userCardMapper.updateUserBankCardInfo(userRecePayCard);
	}
	
	public UserRecePayCard queryBankCardByBindingReqNum(Map<String,Object> paramMap){
 		return userCardMapper.queryBankCardByBindingReqNum(paramMap);
	}
	
	public UserRecePayCard queryUserNewestBankCard(Map<String,Object> paramMap){
		return userCardMapper.queryUserNewestBankCard(paramMap);
	}
	
	public void updateUserBankCardInfoById(UserRecePayCard userRecePayCard){
		userCardMapper.updateUserBankCardInfoById(userRecePayCard);
	}
	
	public Integer updateUserBindindBankCardInfo(UserRecePayCard userRecePayCard){
		return userCardMapper.updateUserBindindBankCardInfo(userRecePayCard);
	}
	
	public void updateUserCardCityAndProvince(UserRecePayCard userRecePayCard){
		userCardMapper.updateUserCardCityAndProvince(userRecePayCard);
	}
	
	public Bank queryBankInfoByBankCodeAndEanble(Map<String,Object> paramMap) {
		return  this.userCardMapper.queryBankInfoByBankCodeAndEanble(paramMap);
	}
	
	/*public List<UserRecePayCard> queryUserCardByBankCodeAndLastNumber(Map<String,Object> paramsMap){
		return this.userCardMapper.queryUserCardByBankCodeAndLastNumber(paramsMap);
	}*/
	
	public UnbindingCardApply queryProcessingUnbindingApply(Map<String,Object> paramsMap){
		return this.unbindingCardApplyMapper.queryProcessingUnbindingApply(paramsMap);
	}
	
	public void addUnbindingCardApply(UnbindingCardApply unbindingCardApply){
		this.unbindingCardApplyMapper.addUnbindingCardApply(unbindingCardApply);
	}
	
	public void updateUnbindingCardApply(UnbindingCardApply unbindingCardApply){
		this.unbindingCardApplyMapper.updateUnbindingCardApply(unbindingCardApply);
	}
	
	public void updateUserBankCardInfoByIdAll(UserRecePayCard userRecePayCard){
		this.userCardMapper.updateUserBankCardInfoByIdAll(userRecePayCard);
	}
	
	public UserQuickWithdraw queryUserQuickCountByIdAndMonth(Map<String,Object> paramsMap){
		return this.userCardMapper.queryUserQuickCountByIdAndMonth(paramsMap);
	}
	
	public UserZSHTCheckCard queryZSHTBankCardCheck(Map<String,Object> paramsMap){
		return this.userCardMapper.queryZSHTBankCardCheck(paramsMap);
	}
	
	public void insertZSHTBankCardCheck(UserZSHTCheckCard userCheckCard){
		this.userCardMapper.insertZSHTBankCardCheck(userCheckCard);
	}
	
	public ZSHTCheckBankCountInfo queryUserCurrentCheckBankInfo(Map<String,Object> paramsMap){
		return this.userCardMapper.queryUserCurrentCheckBankInfo(paramsMap);
	}
	
	public void insertUserCurrentCheckBankInfo(ZSHTCheckBankCountInfo checkBankCountInfo){
		this.userCardMapper.insertUserCurrentCheckBankInfo(checkBankCountInfo);
	}
	
	public void updateUserCurrentCheckBankInfo(ZSHTCheckBankCountInfo checkBankCountInfo){
		this.userCardMapper.updateUserCurrentCheckBankInfo(checkBankCountInfo);
	}
	
	public String queryNextWorkingDay(String currentDay){
		return this.userCardMapper.queryNextWorkingDay(currentDay);
	}
	
	public Long queryWorkingDayByCurrentDay(String currentDay){
		return this.userCardMapper.queryWorkingDayByCurrentDay(currentDay);
	}
	
	public List<WithdrawErrorSendMobile> selectSendErrorMobileList(){
		return this.userCardMapper.selectSendErrorMobileList();
	}
	
	public UserQuickWithdraw queryUserQuickCountByUserId(Map<String,Object> paramsMap){
		return this.userCardMapper.queryUserQuickCountByUserId(paramsMap);
	}
	
	public void insertUserQuickWithdrawInfo(UserQuickWithdraw uqw){
		this.userCardMapper.insertUserQuickWithdrawInfo(uqw);
	}
	
	public Integer updateUserDaysQuickCountMinus(Map<String,Object> param){
		return this.userCardMapper.updateUserDaysQuickCountMinus(param);
	}
	
	public Integer updateUserDaysQuickCountIncrease(Map<String,Object> param){
		return this.userCardMapper.updateUserDaysQuickCountIncrease(param);
	}
}
